<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/task', 'TaskController@home');
Route::post('/upload/test', 'TaskController@index');

Route::post('upload/uploadmp4', 'UploadController@uploadMp4');
Route::post('upload/nine', 'UploadController@uploadNineExcel');
// 用于处理文件上传
Route::post('form/file_upload', 'RequestController@fileUpload');
Route::get('exportlist', 'Home\StatisticsController@exportlist');
Route::get('export', 'Home\StatisticsController@export');
Route::get('ueditor', 'UeditorController@index');
Route::get('ueditor/config', 'UeditorController@config');
Route::post('ueditor/config', 'UeditorController@config');
Route::get('/home', 'HomeController@home');
//单页文件
Route::get('/developing', 'Home\PageController@developing')->name('developing');
Auth::routes();
Route::group(['middleware' => 'auth'], function() {
	Route::get('logout', 'Auth\LoginController@logout')->name('logout');
	Route::get('/', 'HomeController@index')->name('main');
	Route::get('/choose', 'HomeController@choose');
	Route::post('upload/uploadImg','UploadController@uploadImg');
	//公司信息录入
	Route::get('company', 'Home\CompanyController@index')->name('company');
	Route::get('company/home', 'Home\CompanyController@home');
	Route::post('company/create', 'Home\CompanyController@create')->name('company/create');
	Route::post('company/search', 'Home\CompanyController@search')->name('company/search');

	Route::get('ninesmall', 'Home\NinesmallController@index');
	Route::get('ninesmall/category/{categoryId}', 'Home\NinesmallController@category');
	Route::get('ninesmall/choose/{firetype}', 'Home\NinesmallController@choose');
	Route::get('ninesmall/firetype/{companyId}', 'Home\NinesmallController@firetype');
	Route::get('ninesmall/get/{companyId}', 'Home\NinesmallController@get');
	Route::post('ninesmall/create', 'Home\NinesmallController@create');
	Route::post('ninesmall/search', 'Home\NinesmallController@search');
	Route::get('ninesmallelse', 'Home\NinesmallController@indexelse');
	

	Route::get('ninecheck/choose/{status}', 'Home\NinecheckController@choose');
	Route::get('ninecheck/show/{groupId}', 'Home\NinecheckController@show');
	Route::get('ninecheck/finish/{companyId}', 'Home\NinecheckController@finish');
	Route::get('ninecheck/download/{companyId}', 'Home\NinecheckController@download');

	Route::post('ninecheck/signature', 'Home\NinecheckController@signature');
	Route::post('ninecheck/creategroup', 'Home\NinecheckController@creategroup');
	Route::post('ninecheck/create', 'Home\NinecheckController@create');

	//
	Route::get('reset', 'Home\UserController@getReset');
	Route::post('reset', 'Home\UserController@postReset');


	Route::get('check', 'CheckController@index');
	Route::get('check/store', 'CheckController@store');
	Route::get('check/update/{id}', 'CheckController@update');
	Route::get('check/zhili', 'Home\ComcheckController@zhili');
	Route::get('check/taizhang', 'Home\ComcheckController@taizhang');
	//隐患排查
	Route::post('check/create', 'Home\ComcheckController@create');
	

	//学习
	Route::get('learn/news/{id}','Home\LearnController@news');
	Route::get('learn/lists','Home\LearnController@lists');
	Route::get('learn/basis','Home\LearnController@basis');
	
	Route::get('check/show/{id}', 'Home\ComcheckController@show');
	Route::get('check/show1/{id}', 'Home\ComcheckController@show1');
	Route::get('check/show/{id}/group/{groupId}', 'Home\ComcheckController@show');
	Route::get('check/inconform/{id}', 'Home\ComcheckController@inconform');
	Route::get('check/choose/{id}', 'Home\ComcheckController@choose');
	Route::get('check/del/{id}', 'Home\ComcheckController@del');
	Route::get('check/getChecknegative/{id}', 'Home\ComcheckController@getChecknegative');
	Route::get('check/getCheckaccord/{id}', 'Home\ComcheckController@getCheckaccord');
	Route::get('check/exportWord1/{id}', 'Home\ComcheckController@exportWord1');

	Route::get('check/upload', 'UploadController@index');
	Route::post('upload/uploadimg', 'UploadController@uploadImg');
	Route::get('upload/getmap', 'UploadController@getMap');
	Route::post('check/signature', 'Home\ComcheckController@signature');

	// 上传excel
	Route::post('check/upload/excel', 'UploadController@uploadExcel');

		//九小场所复查
	Route::get('smallplace/checkagainindex', 'Home\SmallplacecheckController@checkAgainIndex')->name('smallplace_checkeagain_index');
	Route::get('smallplace/checkagain/{id}', 'Home\SmallplacecheckController@checkAgain')->name('smallplace_checkeagain');
	Route::post('smallplace/checkagain_save', 'Home\SmallplacecheckController@checkAgainSave')->name('smallplace_checkeagain_save');
	Route::get('smallplace/companylist', 'Home\SmallplacecheckController@companyList')->name('smallplace_companylist');
	Route::get('smallplace/downword/{companyId}', 'Home\SmallplacecheckController@downWord')->name('smallplace_downword');

	//隐患检查统计
    Route::get('statistics', 'Home\StatisticsController@Statistics');
    Route::get('today_statistics', 'Home\StatisticsController@TodayStatistics');
    Route::get('area_statistics', 'Home\StatisticsController@AreaStatistics');
    Route::post('area_statistics', 'Home\StatisticsController@AreaStatistics');
    
    Route::get('getRegion/pid/{pid}/type/{type}', 'Home\StatisticsController@getRegion');
	//城市街道
	Route::get('area/getarea/{parentId}', 'Home\AreaController@getAreaChildren');
    Route::get('map/index', 'Home\MapController@index');
    Route::get('charts/index', 'Home\ChartsController@index');

    Route::get('check/produce_show/{id}', 'Home\ComcheckController@produceShow');
    Route::get('check/high_search/{id}', 'Home\ComcheckController@highSearch');
    Route::get('check/getProduce/pid/{pid}', 'Home\ComcheckController@getProduce');
    Route::post('check/group_search/{id}', 'Home\ComcheckController@groupSearch');
    Route::get('ninecheck/update/{groupId}', 'Home\NinecheckController@update');
    Route::get('ninecheck/updateelse/{groupId}', 'Home\NinecheckController@updateelse');
    Route::post('ninecheck/updatepost', 'Home\NinecheckController@updatepost');
    Route::post('ninecheck/updateelsepost', 'Home\NinecheckController@updateelsepost');
    Route::get('ninecheck/showelse/{groupId}', 'Home\NinecheckController@showelse');
    Route::post('ninecheck/createelse', 'Home\NinecheckController@createelse');
    Route::get('ninesmall/companyone/{companyId}', 'Home\NinesmallController@companyone');

    //项目
    Route::get('project', 'Home\ProjectController@index');
    Route::post('project', 'Home\ProjectController@index');
    Route::get('one', 'Home\ProjectController@one');
    Route::post('one', 'Home\ProjectController@one');
    Route::post('/project/update', 'Home\ProjectController@update');
    Route::get('smallplace/downword/{companyId}', 'Home\SmallplacecheckController@downWord')->name('smallplace_downword');
    Route::get('project/company/{projectId}', 'Home\ProjectController@company')->name('project_company');

    //我的企业
    Route::post('ninesmall/mysearch', 'Home\NinesmallController@mysearch');
    Route::get('ninesmall/mysearch', 'Home\NinesmallController@mysearch');
    Route::get('ninesmall/project_statistics', 'Home\NinesmallController@ProjectStatistics');
    Route::get('ninesmall/export', 'Home\NinesmallController@export');
    Route::post('project/delete', 'Home\ProjectController@delete');
    Route::get('ninecheck/downloadwords/{companyId}', 'Home\NinecheckController@downloadwords');
//企业自查
    Route::get('danger/dangercheck/{id}', 'Home\DangerController@dangercheck');
    Route::post('danger/danger_save', 'Home\DangerController@checkDangerSave')->name('danger_save');
    Route::get('ninesmallelse', 'Home\NinesmallController@indexelse');


    //新增
    Route::get('ueditor', 'UeditorController@index');
    Route::get('ueditor/config', 'UeditorController@config');
    Route::post('ueditor/config', 'UeditorController@config');

    Route::get('ninesmallself/firetype/{companyId}', 'Home\NinesmallselfController@firetype');
    Route::get('ninesmallself/choose/{firetype}', 'Home\NinesmallselfController@choose');
    Route::get('ninecheckself/choose/{status}', 'Home\NinecheckselfController@choose');
    Route::get('ninecheckself/show/{groupId}', 'Home\NinecheckselfController@show');
    Route::get('ninecheckself/showelse/{groupId}', 'Home\NinecheckselfController@showelse');
    Route::get('ninecheckself/update/{groupId}', 'Home\NinecheckselfController@update');
    Route::get('ninecheckself/updateelse/{groupId}', 'Home\NinecheckselfController@updateelse');
    Route::post('ninecheckself/updatepost', 'Home\NinecheckselfController@updatepost');
    Route::post('ninecheckself/updateelsepost', 'Home\NinecheckselfController@updateelsepost');
    Route::post('ninecheckself/create', 'Home\NinecheckselfController@create');
    Route::post('ninecheckself/createelse', 'Home\NinecheckselfController@createelse');
    Route::get('ninecheckself/finish/{companyId}', 'Home\NinecheckselfController@finish');
    Route::post('ninecheckself/signature', 'Home\NinecheckselfController@signature');
    Route::get('ninecheckself/download/{companyId}', 'Home\NinecheckselfController@download');
    Route::post('ninecheckself/creategroup', 'Home\NinecheckselfController@creategroup');

    //法律法规
    Route::get('law', 'Home\LawController@category')->name('law');
    Route::get('lawlist', 'Home\LawController@list')->name('lawlist');
    Route::get('lawdetail', 'Home\LawController@detail')->name('lawdetail');
    Route::post('law_download', 'Home\LawController@downLoad')->name('law_download');
    Route::get('ninecheck/showdanger', 'Home\NinecheckController@showdanger');
    Route::post('ninecheck/createdanger', 'Home\NinecheckController@createdanger');
    Route::get('ninecheck/updatedanger/{checkId}', 'Home\NinecheckController@updatedanger');
    Route::post('ninecheck/updatepostdanger', 'Home\NinecheckController@updatepostdanger');
    Route::get('ninesmall/companyone/{companyId}', 'Home\NinesmallController@companyone');
    Route::get('ninesmall/getcompany/{street}/{startdate}/{enddate}', 'Home\NinesmallController@getcompany');
    Route::get('ninesmall/getcompanyagain/{street}/{startdate}/{enddate}', 'Home\NinesmallController@getcompanyagain');
    Route::get('lawnine', 'Home\LawController@nine')->name('lawnine');
});

Route::group(['middleware'=>'auth', 'prefix'=>'admin', 'namespace'=>'Admin'], function() {
    Route::get('law_add', 'LawController@add');
    Route::post('law_add_save', 'LawController@addSave')->name('law_add_save');
    Route::get('law_update', 'LawController@update')->name('law_update');
    Route::post('law_update_save', 'LawController@updateSave')->name('law_update_save');
    Route::get('law_list', 'LawController@list')->name('law_list');
});